package com.clw.template.admin.controller;

import com.clw.template.system.SystemMonitor;
import com.clw.template.util.CommonResult;
import com.clw.template.system.SystemHardwareInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = "SystemHardwareInfoController",description = "系统硬件信息")
@RestController
@RequestMapping("/admin/hardware")
public class SystemHardwareInfoController {

    @PreAuthorize("hasAuthority('sys:hardware:info')")
    @ApiOperation("获取系统硬件信息详情")
    @GetMapping("info")
    public CommonResult<SystemMonitor> info(){
        return CommonResult.success(SystemHardwareInfo.info());
    }

}
